package com.wkq.service.impl;

import com.wkq.dao.IProductDao;
import com.wkq.domain.Product;
import com.wkq.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class IProductServiceImpl implements IProductService {

    @Autowired
    private IProductDao iProductDao;

//    插入单条数据
    @Override
    public void insertSingleData(Product product) {
        iProductDao.insertSingleData(product);
    }

//    查询全部产品信息
    @Override
    public List<Product> findAll() {
        List<Product> list = iProductDao.findAll();
        return list;
    }
}
